package com.lushuan.ch11_springboot_test.service;


import org.springframework.stereotype.Service;

/**
 * CalculatorService provides basic arithmetic operations.
 */
@Service
public class CalculatorService {

    /**
     * Adds two integers.
     *
     * @param a first integer
     * @param b second integer
     * @return the sum of a and b
     */
    public int add(int a, int b) {
        return a + b;
    }

    /**
     * Subtracts the second integer from the first.
     *
     * @param a first integer
     * @param b second integer
     * @return the difference between a and b
     */
    public int subtract(int a, int b) {
        return a - b;
    }

    // Additional methods for multiply and divide can be added here
}
